package cn.xanderye.mdblog.controller;

import cn.xanderye.mdblog.base.BaseServiceImpl;
import cn.xanderye.mdblog.entity.Article;
import cn.xanderye.mdblog.mapper.ArticleMapper;
import cn.xanderye.mdblog.service.ArticleService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hbxz
 * @date 2018/12/19 0019
 */
@RestController
@RequestMapping("article")
public class ArticleServiceController extends BaseServiceImpl<Article> implements ArticleService {
    @Autowired
    private ArticleMapper articleMapper;

    @Override
    public Article findArticleById(Long id) {
        return articleMapper.findArticleById(id);
    }

    @Override
    public PageInfo<Article> queryPageListByWhereDesc(Article article, Integer page, Integer rows) {
        return super.queryPageListByWhereDesc(Article.class, article, page, rows);
    }
}
